package enum01;
/*
* 一周(星期一 -- 星期天)
* 1.我们为一周每天定义一个week()对象，每个week对象都代表改天
* */
public class Week {

    /**
     * 私有化构造方法目的:只能使用Week类中的这七个对象
     * 而不能在类外再创建该类的对象
     */
    private Week(){

    };
    /**
     * public:保证权限足够大,在类外以及不同的包下都能访问
     * static:不需要在类外创建对象,可以通过类名直接调用
     * final:final修饰变量,该变量只能被赋值一次,该变量就成为常量
     * 常量的命名规范,变量名纯大写 XXX_XXX_XXX
     */


    public static final Week MONDAY = new Week();
    public static final Week TUESDAY= new Week();
    public static final Week WEDNESDAY = new Week();
    public static final Week THURSDAY = new Week();
    public static final Week FRIDAY = new Week();
    public static final Week SATURDAY = new Week();
    public static final Week SUNDAY = new Week();


    @Override
    public String toString() {
        return " 星期一   ";
    }
}
